package com.example.forumsystem.demos.web.mapper;

import com.example.forumsystem.demos.web.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleInfoMapper {
    int insert(ArticleInfo row);

    int insertSelective(ArticleInfo row);

    ArticleInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ArticleInfo row);

    int updateByPrimaryKeyWithBLOBs(ArticleInfo row);

    int updateByPrimaryKey(ArticleInfo row);
    List<ArticleInfo> selectAll();

    List<ArticleInfo> selectAllByBoardId(@Param("boardId") Long boardId);

    ArticleInfo selectDetailById(@Param("id") Long id);

    List<ArticleInfo> selectByUserId(Long userId);
}